package com.example.administrator.adroidtest;

import android.app.Activity;
import android.content.DialogInterface;
import android.os.Bundle;
import android.view.View;

import java.util.ArrayList;

public class Test2AddButtonActivity extends Activity implements WaveformlistDialog.onWaveformlistSelectListener{

    private WaveformlistDialog waveformdialog=null;
    private ArrayList<String> arraylist=null;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_test2_add_button);
        init();




    }

    private void init() {
        arraylist=new ArrayList<String>();
        arraylist.add(getResources().getString(R.string.text_accelerated_speed));
        arraylist.add(getResources().getString(R.string.text_speed));
        arraylist.add(getResources().getString(R.string.text_displacement));
        arraylist.add(getResources().getString(R.string.text_displacement));

    }

    public void onClickAddButton(View view){
        waveformdialog=new WaveformlistDialog(this,this,arraylist);
        waveformdialog.show();
    }

    @Override
    public void selectwaveformlist(String name) {

        waveformdialog.cancel();
    }
}
